package com.scienview.permission.role.controller;


import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.scienview.core.anotation.Access;
import com.scienview.core.enums.Level;
import com.scienview.core.util.JackJson;
import com.scienview.permission.role.model.Role;
import com.scienview.platform.controller.BaseController;
import com.scienview.platform.json.Json;

@Controller
@RequestMapping("permission/role")
public class RoleController extends BaseController{

	@RequestMapping("roleList")
	@Access(level=Level.USER)
	public String roleList(){
		System.out.println("roleList");
		return SUCCESS;
	}
	
	@RequestMapping("roleAdd")
	@Access(level=Level.USER)
	public String roleAdd(){
		System.out.println("roleAdd");
		return SUCCESS;
	}
	
	@RequestMapping("addRole")
	@Access(level=Level.USER)
	@ResponseBody
	public Json addRole(Role role){
		System.out.println("addRole");
		Json json=new Json();
		return json;
	}
	
	@RequestMapping("roleEdit")
	@Access(level=Level.USER)
	public String roleEdit(){
		System.out.println("roleEdit");
		return SUCCESS;
	}
	
	@RequestMapping("editRole")
	@Access(level=Level.USER)
	@ResponseBody
	public String editRole(){
		System.out.println("roleEdit");
		System.out.println("addRole");
		Json json=new Json();
		json.setResult(",,,,,,,,");
		
		return JackJson.toJson(json);
	}
}
